#ifndef rbac_user_h__
#define rbac_user_h__



#include "rbac_base_obj.hpp"

namespace rbac_kernel
{
	template <class T>
	class user:public base_obj<T>
	{
	public:
		typedef		std::vector<T>	rbac_key_vec;
		typedef		user<T>					this_type;
		typedef		base_obj<T>				base_type;
		typedef		typename rbac_key_vec::iterator iterator;
		typedef		typename  rbac_key_vec::const_iterator const_iterator;

		user(const T& gid,const T& owner,const std::string& name)
			:base_type(gid,rbac_user_t,name,owner)
		{
		}
		virtual ~user(){};

		virtual	this_type* clone_new() const
		{
			return new this_type(*this);
		}

		const rbac_key_vec&		container()const
		{
			return role_assigned_;
		}

		rbac_key_vec&		container()
		{
			return role_assigned_;
		}
	protected:
	private:
		rbac_key_vec		role_assigned_;
	};

};//rbac_kernel

#endif // rbac_user_h__
